//
//  FKCoupon.m
//  HappyTest
//
//  Created by Macbook Pro on 2019/2/27.
//  Copyright © 2019 Macbook Pro. All rights reserved.
//

#import "FKCoupon.h"

@implementation FKCoupon

- (void)mj_keyValuesDidFinishConvertingToObject
{
//    _cateW = [_title sizeWithAttributes:@{NSFontAttributeName : fk_adjustFont(11)}].width + 16;
    
    if ([_status isEqualToString:@"1"]) {
        _statusName = @"未使用";
        _high = true;
    } else if ([_status isEqualToString:@"2"]) {
        _statusName = @"已使用";
    } else if ([_status isEqualToString:@"3"]) {
        _statusName = @"已过期";
    }
    
    _startTime = [_start_time fk_timeWithFormat:@"yyyy.MM.dd"];
    _endTime = [_end_time fk_timeWithFormat:@"yyyy.MM.dd"];
    
    NSString *priceStr = fkFORMAT(@"￥%@", _price);
    _priceStr = [priceStr fk_addAttributeStyle:@"￥" color:fkMainColor font:fk_adjustFont(15)];
    
    _conditionStr = fkFORMAT(@"满%@元可用", _minprice);
    
}

@end
